Skip to content

fix(auto-approve): skip self-authored PRs from panicboat-ci-bot - #810

Merged
panicboat merged 2 commits into
mainfrom
fix/auto-approve-self-pr
Aug 20, 2026
Merged

fix(auto-approve): skip self-authored PRs from panicboat-ci-bot#810
panicboat merged 2 commits into
mainfrom
fix/auto-approve-self-pr

Conversation

@panicboat

Copy link
Copy Markdown
Owner

Why

release-please PR(例: #422)が hmarr/auto-approve-action で自動承認されず、Auto-approve PRs チェックが常に失敗していた。

Current user is github-actions[bot]
Pull request #422 has not been approved yet, creating approving review
##[error]Unprocessable Entity: "Review Can not approve your own pull request"

hmarr/auto-approve-actiongetLoginForTokenGET /user を叩き、GitHub App の installation token は必ずこれに 403 を返すため、実際の identity を確認せず "github-actions[bot]" という文字列を決め打ちで返す(ソース)。実際に createReview を呼ぶ token は本物の App identity(panicboat-ci-bot[bot])で認証されるため、PR の author も同じ App のときだけ GitHub 側が自己承認として 422 で拒否する。

app-id 1371999(panicboat-ci-bot)は release-please の PR 作成にも auto-approve のトークン生成にも使われている。renovate(別 App)の PR は問題なく承認できている実績がある。

$ gh pr list --repo panicboat/monorepo --state merged ...
app/renovate         → reviewers: ["renovate-approve","panicboat-ci-bot"]   OK
app/panicboat-ci-bot → reviewers: []                                        常に失敗

What

job の if 条件に、PR の author が panicboat-ci-bot[bot] 自身のときは skip する条件を追加した。

if: endsWith(github.actor, '[bot]') && github.event.pull_request.user.login != 'panicboat-ci-bot[bot]'

release-please PR は人間がレビューする運用になる。renovate 等の他 bot PR は影響なく自動承認される。

🤖 Generated with Claude Code

https://claude.ai/code/session_01FJMY2CQPbJLzu5daCKMuM5

Signed-off-by: panicboat <panicboat@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1067f26d-7099-4642-bc81-36079eeb2be1


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: panicboat <panicboat@gmail.com>
@panicboat
panicboat marked this pull request as ready for review August 20, 2026 15:16
@panicboat
panicboat merged commit 2db15d5 into main Aug 20, 2026
6 of 7 checks passed
@panicboat
panicboat deleted the fix/auto-approve-self-pr branch August 20, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant